#pragma once
#include "utils/typeinfow.h"

class NamedObject
{
	mutable std::unique_ptr<TypeInfoW> _typeInfow;		
	mutable String _classname;

	String _id; //TODO

public:

	inline NamedObject() 
	{}

	virtual inline ~NamedObject() 
	{}
	
	//nome della classe
	virtual inline const String& getClassName()const
	{
		if(NULL==_typeInfow.get())
		{			
			_typeInfow.reset( new TypeInfoW(typeid(*this)) );
			_classname = _typeInfow->getTypeInfo().name();
		}
		return _classname;
	}

	//id
	inline const String& getId()const
	{
		return _id;
	}


};



